<script>on closeFieldput stripit(me) into sset the numberformat to "0.000"add 0 to sput s into meglobal edittif editt=false thenif field "price"≠empty then calcend ifend closeField</script>
</part>
<part>
<id>5</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>186</left>
<top>110</top>
<right>272</right>
<bottom>129</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>18</textHeight>
<name>price</name>
<script>on closeFieldput formatit3(makeDecimal(stripit(me))) into meglobal edittif editt=false thenif field "shares"≠empty then calcend ifend closeField</script>
</part>
<part>
<id>7</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>186</left>
<top>146</top>
<right>272</right>
<bottom>165</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>18</textHeight>
<name>comm</name>
<script>on closeFieldput formatit2(me) into meglobal edittif editt=false thengetNet -- in card script for buy and sellend ifend closeField</script>
</part>
<part>
<id>6</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <true /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>186</left>
<top>128</top>
<right>272</right>
<bottom>148</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>18</textHeight>
<name>value</name>
<script></script>
</part>
<part>
<id>8</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>440</left>
<top>120</top>
<right>504</right>
<bottom>172</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Record</name>
<script>on mouseUpokayend mouseUp</script>
</part>
<part>
<id>9</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>447</left>
<top>88</top>
<right>497</right>
<bottom>105</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>extend</textStyle>
<name>cancel</name>
<script>on mouseUpglobal transcardvisual barn door closego transcardend mouseUp</script>
<text>Date:# shares:Price/share:Value of shares:Total fees:Net amount:</text>
</content>
<content>
<layer>background</layer>
<id>30</id>
<text>Editmode</text>
</content>
<name>buy/sell</name>
<script>on closecardglobal edittlock screenput "1,3,4,5,6,7,10,13" into itemlistrepeat with x=1 to (the number of items in itemlist)do "put empty into field "& (item x of itemlist)end repeathide bg button "erase"hide bg button "calc"hide field "edit"put "false" into edittset locktext of field "value" to trueset locktext of field "net" to trueif there is a cd field "sorry" then hide cd field "sorry"unlock screenend closecardon storeOld -- store old values to reconstruct original if ∆ linked banksput field "date"&","&field "type" &","&field "stock"&"," into field "stored"if field "type"="buy" thenput placeSign(-(stripit(field "net"))) after field "stored"elseput placeSign(stripit(field "net")) after field "stored"end ifend storeOldon eraseStockItemeraseSureglobal transcard,translineif the short name of this cd="sell" thenput "Y" into sellerput cd field "openshares" into newStuffput cd field "closeshares" into closeStuffput cd field "copy" into copyStuffend ifgo transcardif seller="Y" thenset numberformat to "0.000"-- adjust open share values in stockreg fields; not data fieldrepeat with x=1 to the number of lines of newstuffif last word of line x of newstuff="√" then delete last word of line x of newstuffput line x of copystuff into temp -- to find line of orig text of opensharesif last word of temp="√" then delete last word of tempput FindLine(temp,field "stockreg") into linerif liner=0 then next repeat -- in case not foundput word 9 of line x of closeStuff into csput word 7 of line liner of newstuff into osput (cs+os) into newOpen-- equalize spacesput the number of chars of os into cOsput the number of chars of newOpen into cNOput cNO-cOs into charDiffif charDiff>0 then -- new # has more charsrepeat with dd=1 to abs(charDiff)delete char 61 of line liner of newStuffend repeatend ifif charDiff<0 then -- new # has fewer charsrepeat with dd=1 to abs(charDiff)put " " after char 61 of line liner of newStuffend repeatend ifput newOpen into word 7 of line liner of newstuffput NTFSNTText(line x of newstuff,T) into line liner of field "stockreg" -- replace with new # open shares-- put (cs+os) into item 7 of line liner of field "data"end repeatend ifdelete line transline of field "data"delete line transline of field "stockreg"delete line transline of field "openItems"delete line transline of field "closeItems"unlock screen with barn door closecountsharesend eraseStockItem</script>